/**
 * 
 */
package com.swe727.spring2011.constraint1.datastore;

import java.io.Serializable;
import java.util.HashSet;

import com.swe727.spring2011.constraint1.message.Message;

/**
 * A DataStore is the contract for any data stores the zone server uses.
 * @author Trevor Wright
 *
 */
public interface DataStore<T extends Message<?>, K> extends Serializable {

	/**
	 * Add an object to the data store.
	 * @param data data to add to the store
	 */
	public void add(T data);
	
	/**
	 * Get all data from the data store mapped to the given key.
	 * @param key the key used to retrieve data
	 * @return all data from the store
	 */
	public HashSet<T> getAll(K key);
}
